﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;

namespace CustomerOrderingSystem
{
    class sql_good
    {
        public static DataTable QueryDataTable(string sql)
        {
            string _sql = " select * from Goods where 1=1" + sql;
            SqlConnection conn = Sql.d();
            SqlDataAdapter sda = new SqlDataAdapter(_sql, conn);
            DataSet ds = new DataSet();
            sda.Fill(ds);
            DataTable DT = ds.Tables[0];
            return DT;
        }
        public static DataTable QueryDataTable0()
        {
            return QueryDataTable(null);


        }
       
    }
}
